
#include "gmatlab.h"

// mxArray *g_type_matlab_register(mxArray *parent, mxArray *properties, mxArray *methods, mxArray *signals, mxArray *interfaces);
void mexFunction(int nlhs, mxArray *lhs[], int nrhs, mxArray *rhs[])
{

  // Check and convert arguments
  if (nrhs != 5) g_matlab_error("gmatlab:numArg", "g_signal_connect() takes 5 arguments");
  if (nlhs != 1) g_matlab_error("gmatlab:numRet", "g_type_matlab_register() has 1 return values");
  if (mxGetNumberOfElements(rhs[0]) != 1) g_matlab_error("gmatlab:badArray", "g_type_matlab_register: Arg 1 must have one element");
  if (!g_matlab_check_class(rhs[0], "glib.GClass"))
    g_matlab_error("gmatlab:badArray", "g_type_matlab_register: Arg 1 must be glib.GClass, not %s", mxGetClassName(rhs[0]));
  g_matlab_error("gmatlab:systemError", "Incomplete MEX-function implementation!");
  
  // Call function
//  lhs[0] = g_type_matlab_register(rhs[0], rhs[1], rhs[2], rhs[3], rhs[4]);
  
  // Prepare return value

  g_matlab_cleanup();
}
